package cn.tedu.mall.order.mapper;

import cn.tedu.mall.pojo.order.model.OmsOrderItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderItemMapper {

    void insertOrderItems(@Param("omsOrderItems")List<OmsOrderItem> omsOrderItemList);

    @Select("select count(*) from oms_order_item where order_id=#{orderId}")
    Integer selectCountByOrderId(@Param("orderId")Long id);
    @Select("select oms_order_item.sku_id from oms_order_item where order_id=#{orderId}")
    List<String> selectSkuIdsByOrderId(@Param("orderId")Long id);
}
